class DailyAttendance:
    def __init__(
        self,
        card_no,
        name,
        date,
        arrival_status,
        arrival_time,
        departure_status,
        departure_time,
    ):
        self.card_no = card_no
        self.date = date
        self.name = name
        self.arrival_status = arrival_status
        self.arrival_time = arrival_time
        self.departure_status = departure_status
        self.departure_time = departure_time

    def __str__(self):
        return f"工号: {self.card_no}, 姓名: {self.name},日期: {self.date}, 上班状态: {self.arrival_status}, 上班时间: {self.arrival_time}, 下班状态: {self.departure_status}, 下班时间: {self.departure_time}"

    def to_dict(self):
        return {
            "card_no": self.card_no,
            "name": self.name,
            "date": self.date,
            "arrival_status": self.arrival_status,
            "arrival_time": self.arrival_time,
            "departure_status": self.departure_status,
            "departure_time": self.departure_time,
        }
